<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>KAHNSEPT</title>
<link rel="stylesheet" type="text/css" href="styles/main.css" />
<link rel="stylesheet" type="text/css" href="styles/jquery.ui.all.css" />
<link rel="stylesheet" type="text/css" href="styles/jquery.ui.autocomplete.css" />
<link rel="stylesheet" type="text/css" href="styles/jquery.ui.base.css" />
<link rel="stylesheet" type="text/css" href="styles/jquery.ui.core.css" />
<link rel="stylesheet" type="text/css" href="styles/jquery.ui.theme.css" />
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="/lib/0.6/js/json2.min.js"></script>
<script type="text/javascript" src="/lib/0.6/js/utils.js"></script>
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.2.custom.min.js"></script>
<script type="text/javascript">
var kahnsept = namespace.lookup("com.pageforest.examples.kahnsept");
$(document).ready(kahnsept.onReady);
</script>
</head>
<body>
<div class="page">
<h1><script>document.write(document.title);</script></h1>
<div style="text-align:right">
  <input type="button" id="signin" onclick="kahnsept.signInOut()" value="Sign in" />
  <p style="font-style:italic;font-size:20px;">Current username: <span id="username"></span></p>
</div>
<fieldset>
  <legend>Data Fields</legend>
  <ol>
    <li>
      <label for="title">Title:</label>
      <input type="text" id="title" name="title" value="My Document" />
    </li>
    <li>
      <label>Schemas:</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="Add New Schema" onclick="kahnsept.addSchema();" /><ul>
      		<div id="schemas"></div>
      </ul>
    </li>
    <li>
    	<label>Instances:</label><ul>
    		<div id="instances"></div>
   	  </ul>
    </li>
  </ol>
 
  <div style="float:right;">
    <input type="button" onclick="kahnsept.client.detach();" value="Make a Copy" />
    <input id="save" type="button" onclick="kahnsept.client.save();" value="Save" />
  </div>
  <p><i>Document is <span id="doc-state">clean</span>.</i></p>
</fieldset>

<fieldset>
  <legend>API Status</legend>
  <div id="error"></div>
</fieldset>

<fieldset>
  <legend>Explore</legend>
  <p>
    This sample is designed to show you how to create your own Pageforest application.  See the links
    below for more information.
  </p>
  <ol>
    <li><a id="document" target="_blank">JSON data for this document</a> - Examine the (JSON) data format for documents saved on Pageforest.</li>
    <li><a id="mydocs" target="_blank" href="http://www.pageforest.com/docs/">My Pageforest documents</a> - A directory of all your saved documents.</li>
    <li><a target="_blank" href="http://code.google.com/p/pageforest/source/browse/#hg/examples/kahnsept">Source code</a> - View the code for this application.</li>
    <li><a id="app-details" target="_blank" href="http://www.pageforest.com/apps/kahnsept/">Application Details</a> - Clone this application to start your own Pageforest application.</li>
    <li><a target="_blank" href="http://code.google.com/p/pageforest/wiki/GettingStarted">Getting Started</a> - How to get started with the Pageforest API.</li>
  </ol>
</fieldset>
</body>
</div>
</html>
